﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using COFE.Core;

namespace COFE.Core
{
    public interface IEntryListRegistrar
    {
        /// <summary>
        /// Register an EntryList.
        /// </summary>
        /// <param name="owner"></param>
        /// <param name="entryList"></param>
        void RegisterEntryList(IEntryList entryList);

        /// <summary>
        /// Remove the entry list from the registrar.
        /// </summary>
        /// <param name="entryList"></param>
        void RemoveEntryList(string entryListId);

        string[] GetEntryLists();        

        IEntryList this[string name] { get; }
    }

    public static class IEntryListRegistrarExtension
    {
        public static void RegisterEntryList(this IEntryListRegistrar registrar, IEntryList entryList)
        {
            registrar.RegisterEntryList(entryList);
        }
    }
}
